package com.zsqat.eshop.auth.feign;

import com.zsqat.common.utils.R;
import com.zsqat.eshop.auth.vo.SocialUser;
import com.zsqat.eshop.auth.vo.UserLoginVo;
import com.zsqat.eshop.auth.vo.UserRegisterVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("eshop-member")
public interface MemberFeignService {

  @PostMapping(value = "/member/member/register")
  R register(@RequestBody UserRegisterVo registerVo);


  @PostMapping(value = "/member/member/login")
  R login(@RequestBody UserLoginVo userLoginVo);

  @PostMapping(value = "/member/member/oauth2/login")
  R oauthLogin(@RequestBody SocialUser socialUser) throws Exception;

  @PostMapping(value = "/member/member/weixin/login")
  R weixinLogin(@RequestParam("accessTokenInfo") String accessTokenInfo);
}
